#pragma once

#include <iostream>
#include <vector>
#include <map>
#include <variant>
#include <typeinfo>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/lg2.hpp>
#include <phosphor-logging/log.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#include <xyz/openbmc_project/Logging/SEL/error.hpp>


using oemCmd = uint8_t;

#define TEMP_FAULT_LOG_PATH "/tmp/cper/"

#define CPER_LOG_DIR "/var/log/ras/"

#define RAS_IPMI_MAX_PART_NUM 255

#define PART_ID_OFFSET 0



// IPMI Discrete sensor DBUS path
#define ProcessorInventoryPath                                                 \
    "/com/inspur/system/chassis/motherboard/process"
#define MemoryInventoryPath                                                    \
    "/com/inspur/system/chassis/motherboard/memory"
#define PCIeIventoryPath "/com/inspur/system/chassis/motherboard/pcie"



enum partID : uint8_t
{
    FIRST_CPER_PACKET = 0,
    LAST_CPER_PACKET = 0xFF,
};

enum sensorType : uint8_t
{
    PROCESSOR,
    MEMORY,
    PCIE,
};

enum severityCPER : uint8_t
{
    RECOVERABLE = 0,
    FATAL,
    CORRECTED,
    INFORMATIONAL,
};

struct PhytiumRasInfoData
{
	uint8_t 	RecvPartId;
	uint8_t 	CurrentPartId;
	uint16_t 	RecvTotalLen;
	uint16_t 	CurrentPartLen;
	uint16_t	RecvCrc;
};
